<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>日本旅行实用英语指南</title>
    <style>
        :root {
            --primary-color: #e83a52;
            --secondary-color: #2c3e50;
            --accent-color: #3498db;
            --light-gray: #f4f4f4;
            --white: #ffffff;
            --text-dark: #333333;
            --text-light: #666666;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: var(--light-gray);
            color: var(--text-dark);
            line-height: 1.6;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        header {
            background-color: var(--primary-color);
            color: var(--white);
            padding: 20px 0;
            text-align: center;
            border-radius: 8px 8px 0 0;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        
        header h1 {
            font-size: 2.2rem;
            margin-bottom: 10px;
        }
        
        header p {
            font-size: 1.1rem;
            opacity: 0.9;
        }
        
        .navigation {
            background-color: var(--white);
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            position: sticky;
            top: 10px;
            z-index: 100;
        }
        
        .nav-tabs {
            display: flex;
            flex-wrap: wrap;
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .nav-tabs li {
            flex: 1;
            text-align: center;
        }
        
        .nav-tabs li a {
            display: block;
            padding: 15px 10px;
            color: var(--text-light);
            text-decoration: none;
            font-weight: 600;
            transition: all 0.3s ease;
            border-bottom: 3px solid transparent;
        }
        
        .nav-tabs li a:hover, .nav-tabs li a.active {
            color: var(--primary-color);
            border-bottom: 3px solid var(--primary-color);
            background-color: rgba(232, 58, 82, 0.05);
        }
        
        .content-section {
            background-color: var(--white);
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-bottom: 30px;
            padding: 30px;
        }
        
        .section-title {
            font-size: 1.8rem;
            color: var(--secondary-color);
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid var(--light-gray);
        }
        
        .subsection {
            margin-bottom: 30px;
        }
        
        .subsection-title {
            font-size: 1.4rem;
            color: var(--primary-color);
            margin-bottom: 15px;
        }
        
        .phrase-list {
            list-style: none;
        }
        
        .phrase-item {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            transition: all 0.3s ease;
            border-left: 4px solid var(--accent-color);
        }
        
        .phrase-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
        }
        
        .phrase-english {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--secondary-color);
            margin-bottom: 5px;
            display: flex;
            align-items: center;
        }
        
        .phrase-chinese {
            font-size: 1rem;
            color: var(--text-light);
        }
        
        .audio-btn {
            width: 30px;
            height: 30px;
            background-color: var(--accent-color);
            color: white;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            transition: all 0.3s ease;
        }
        
        .audio-btn:hover {
            background-color: #2980b9;
            transform: scale(1.1);
        }
        
        .search-bar {
            background-color: var(--white);
            padding: 15px;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
            display: flex;
        }
        
        .search-bar input {
            flex: 1;
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 1rem;
        }
        
        .search-bar button {
            background-color: var(--primary-color);
            color: white;
            border: none;
            border-radius: 4px;
            padding: 10px 20px;
            margin-left: 10px;
            cursor: pointer;
            font-weight: 600;
        }
        
        .search-bar button:hover {
            background-color: #c0392b;
        }
        
        footer {
            text-align: center;
            padding: 20px 0;
            color: var(--text-light);
            font-size: 0.9rem;
        }
        
        @media (max-width: 768px) {
            .nav-tabs li a {
                padding: 10px 5px;
                font-size: 0.9rem;
            }
            
            .phrase-english {
                font-size: 1.1rem;
            }
            
            .phrase-chinese {
                font-size: 0.9rem;
            }
            
            .content-section {
                padding: 20px;
            }
        }
        
        /* 紧急情况突出显示 */
        #emergency .phrase-item {
            border-left: 4px solid #e74c3c;
        }
        
        #emergency .audio-btn {
            background-color: #e74c3c;
        }
        
        #emergency .audio-btn:hover {
            background-color: #c0392b;
        }
        
        .emergency-note {
            background-color: #fdecea;
            border-left: 4px solid #e74c3c;
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 4px;
        }
        
        /* 强调高频表达 */
        .high-frequency {
            position: relative;
        }
        
        .high-frequency::after {
            content: "常用";
            position: absolute;
            top: -5px;
            right: -5px;
            background-color: var(--primary-color);
            color: white;
            padding: 3px 8px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: bold;
        }
        
        /* 音频播放反馈 */
        .playing {
            animation: pulse 1s infinite;
        }
        
        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>日本旅行实用英语指南</h1>
            <p>点击音频按钮即可收听标准发音</p>
        </header>
        
        <div class="search-bar">
            <input type="text" id="search-input" placeholder="搜索英语表达或关键词...">
            <button onclick="searchPhrases()">搜索</button>
        </div>
        
        <div class="navigation">
            <ul class="nav-tabs">
                <li><a href="#airport" class="active">机场与入境</a></li>
                <li><a href="#transportation">交通出行</a></li>
                <li><a href="#accommodation">住宿服务</a></li>
                <li><a href="#dining">餐饮美食</a></li>
                <li><a href="#shopping">购物支付</a></li>
                <li><a href="#sightseeing">观光景点</a></li>
                <li><a href="#emergency">紧急情况</a></li>
            </ul>
        </div>
        
        <!-- 机场与入境场景 -->
        <div id="airport" class="content-section">
            <h2 class="section-title">机场与入境场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">入境手续</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('what-is-the-purpose-of-your-visit')">
                                <i>▶</i>
                            </button>
                            What is the purpose of your visit?
                        </div>
                        <div class="phrase-chinese">您此行的目的是什么？</div>
                    </li>
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-am-here-for-tourism')">
                                <i>▶</i>
                            </button>
                            I am here for tourism.
                        </div>
                        <div class="phrase-chinese">我是来旅游的。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('how-long-will-you-stay')">
                                <i>▶</i>
                            </button>
                            How long will you stay?
                        </div>
                        <div class="phrase-chinese">您打算逗留多久？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-will-stay-for-one-week')">
                                <i>▶</i>
                            </button>
                            I will stay for one week.
                        </div>
                        <div class="phrase-chinese">我会停留一周。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('do-you-have-a-return-ticket')">
                                <i>▶</i>
                            </button>
                            Do you have a return ticket?
                        </div>
                        <div class="phrase-chinese">您有回程票吗？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">海关申报</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('do-you-have-anything-to-declare')">
                                <i>▶</i>
                            </button>
                            Do you have anything to declare?
                        </div>
                        <div class="phrase-chinese">您有需要申报的物品吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-have-nothing-to-declare')">
                                <i>▶</i>
                            </button>
                            I have nothing to declare.
                        </div>
                        <div class="phrase-chinese">我没有需要申报的物品。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('where-is-the-baggage-claim')">
                                <i>▶</i>
                            </button>
                            Where is the baggage claim?
                        </div>
                        <div class="phrase-chinese">行李领取处在哪里？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 交通出行场景 -->
        <div id="transportation" class="content-section">
            <h2 class="section-title">交通出行场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">地铁与电车</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('where-can-i-buy-a-train-ticket')">
                                <i>▶</i>
                            </button>
                            Where can I buy a train ticket?
                        </div>
                        <div class="phrase-chinese">我在哪里可以买到车票？</div>
                    </li>
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('how-do-i-get-to')">
                                <i>▶</i>
                            </button>
                            How do I get to [place name]?
                        </div>
                        <div class="phrase-chinese">我怎样去[地名]？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('which-platform-for-shinjuku')">
                                <i>▶</i>
                            </button>
                            Which platform for Shinjuku?
                        </div>
                        <div class="phrase-chinese">去新宿的站台是哪个？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('is-this-the-right-train-for')">
                                <i>▶</i>
                            </button>
                            Is this the right train for [destination]?
                        </div>
                        <div class="phrase-chinese">这是去[目的地]的正确列车吗？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">出租车</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('please-take-me-to')">
                                <i>▶</i>
                            </button>
                            Please take me to [hotel name/place].
                        </div>
                        <div class="phrase-chinese">请带我去[酒店名/地点]。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('how-much-is-the-fare')">
                                <i>▶</i>
                            </button>
                            How much is the fare?
                        </div>
                        <div class="phrase-chinese">车费是多少？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('can-i-pay-by-credit-card')">
                                <i>▶</i>
                            </button>
                            Can I pay by credit card?
                        </div>
                        <div class="phrase-chinese">我可以用信用卡支付吗？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 住宿服务场景 -->
        <div id="accommodation" class="content-section">
            <h2 class="section-title">住宿服务场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">入住手续</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-have-a-reservation-under-the-name')">
                                <i>▶</i>
                            </button>
                            I have a reservation under the name [your name].
                        </div>
                        <div class="phrase-chinese">我以[您的姓名]预订了房间。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('what-time-is-check-out')">
                                <i>▶</i>
                            </button>
                            What time is check-out?
                        </div>
                        <div class="phrase-chinese">退房时间是几点？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('is-breakfast-included')">
                                <i>▶</i>
                            </button>
                            Is breakfast included?
                        </div>
                        <div class="phrase-chinese">包含早餐吗？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">客房服务</h3>
                <ul class="phrase-list">
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('the-air-conditioner-is-not-working')">
                                <i>▶</i>
                            </button>
                            The air conditioner is not working.
                        </div>
                        <div class="phrase-chinese">空调不工作了。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('could-i-have-more-towels')">
                                <i>▶</i>
                            </button>
                            Could I have more towels, please?
                        </div>
                        <div class="phrase-chinese">请问可以再给我一些毛巾吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('whats-the-wifi-password')">
                                <i>▶</i>
                            </button>
                            What's the Wi-Fi password?
                        </div>
                        <div class="phrase-chinese">Wi-Fi密码是什么？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 餐饮美食场景 -->
        <div id="dining" class="content-section">
            <h2 class="section-title">餐饮美食场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">点餐与用餐</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('a-table-for-two-please')">
                                <i>▶</i>
                            </button>
                            A table for two, please.
                        </div>
                        <div class="phrase-chinese">请给我们两个人的桌子。</div>
                    </li>
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('do-you-have-an-english-menu')">
                                <i>▶</i>
                            </button>
                            Do you have an English menu?
                        </div>
                        <div class="phrase-chinese">你们有英文菜单吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('what-do-you-recommend')">
                                <i>▶</i>
                            </button>
                            What do you recommend?
                        </div>
                        <div class="phrase-chinese">您推荐什么？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-would-like-to-order')">
                                <i>▶</i>
                            </button>
                            I would like to order [dish name].
                        </div>
                        <div class="phrase-chinese">我想点[菜名]。</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">饮食特殊需求</h3>
                <ul class="phrase-list">
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-am-vegetarian')">
                                <i>▶</i>
                            </button>
                            I am vegetarian.
                        </div>
                        <div class="phrase-chinese">我是素食者。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-am-allergic-to')">
                                <i>▶</i>
                            </button>
                            I am allergic to [allergen].
                        </div>
                        <div class="phrase-chinese">我对[过敏原]过敏。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('is-this-spicy')">
                                <i>▶</i>
                            </button>
                            Is this spicy?
                        </div>
                        <div class="phrase-chinese">这个辣吗？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 购物支付场景 -->
        <div id="shopping" class="content-section">
            <h2 class="section-title">购物支付场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">购物交流</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('how-much-is-this')">
                                <i>▶</i>
                            </button>
                            How much is this?
                        </div>
                        <div class="phrase-chinese">这个多少钱？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('do-you-have-this-in-another-size')">
                                <i>▶</i>
                            </button>
                            Do you have this in another size/color?
                        </div>
                        <div class="phrase-chinese">你们有其他尺码/颜色的吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('can-i-try-this-on')">
                                <i>▶</i>
                            </button>
                            Can I try this on?
                        </div>
                        <div class="phrase-chinese">我可以试穿这个吗？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">退税服务</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('can-i-get-tax-free')">
                                <i>▶</i>
                            </button>
                            Can I get tax-free shopping?
                        </div>
                        <div class="phrase-chinese">我可以享受免税购物吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('where-is-the-tax-refund-counter')">
                                <i>▶</i>
                            </button>
                            Where is the tax refund counter?
                        </div>
                        <div class="phrase-chinese">退税柜台在哪里？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-need-my-passport-for-tax-free')">
                                <i>▶</i>
                            </button>
                            I need my passport for tax-free shopping.
                        </div>
                        <div class="phrase-chinese">我需要护照进行免税购物。</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 观光景点场景 -->
        <div id="sightseeing" class="content-section">
            <h2 class="section-title">观光景点场景</h2>
            
            <div class="subsection">
                <h3 class="subsection-title">景点信息</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('what-time-does-it-open')">
                                <i>▶</i>
                            </button>
                            What time does it open/close?
                        </div>
                        <div class="phrase-chinese">几点开放/关闭？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('how-much-is-the-entrance-fee')">
                                <i>▶</i>
                            </button>
                            How much is the entrance fee?
                        </div>
                        <div class="phrase-chinese">入场费是多少？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('is-photography-allowed')">
                                <i>▶</i>
                            </button>
                            Is photography allowed?
                        </div>
                        <div class="phrase-chinese">允许拍照吗？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">导览服务</h3>
                <ul class="phrase-list">
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('do-you-have-guided-tours-in-english')">
                                <i>▶</i>
                            </button>
                            Do you have guided tours in English?
                        </div>
                        <div class="phrase-chinese">你们有英语导览服务吗？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('when-is-the-next-tour')">
                                <i>▶</i>
                            </button>
                            When is the next tour?
                        </div>
                        <div class="phrase-chinese">下一场导览什么时候开始？</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('what-is-the-history-of-this-place')">
                                <i>▶</i>
                            </button>
                            What is the history of this place?
                        </div>
                        <div class="phrase-chinese">这个地方的历史是什么？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <!-- 紧急情况场景 -->
        <div id="emergency" class="content-section">
            <h2 class="section-title">紧急情况场景</h2>
            
            <div class="emergency-note">
                <p><strong>重要提示：</strong>在紧急情况下，日本的紧急电话号码是 110（警察）和 119（救护车/消防）。尽量保持冷静，清晰表达您的需求。</p>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">医疗急救</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-need-a-doctor')">
                                <i>▶</i>
                            </button>
                            I need a doctor!
                        </div>
                        <div class="phrase-chinese">我需要医生！</div>
                    </li>
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('please-call-an-ambulance')">
                                <i>▶</i>
                            </button>
                            Please call an ambulance!
                        </div>
                        <div class="phrase-chinese">请叫救护车！</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('where-is-the-nearest-pharmacy')">
                                <i>▶</i>
                            </button>
                            Where is the nearest pharmacy?
                        </div>
                        <div class="phrase-chinese">最近的药店在哪里？</div>
                    </li>
                </ul>
            </div>
            
            <div class="subsection">
                <h3 class="subsection-title">安全与警察</h3>
                <ul class="phrase-list">
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('i-lost-my-passport')">
                                <i>▶</i>
                            </button>
                            I lost my passport.
                        </div>
                        <div class="phrase-chinese">我的护照丢了。</div>
                    </li>
                    <li class="phrase-item high-frequency">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('my-wallet-was-stolen')">
                                <i>▶</i>
                            </button>
                            My wallet was stolen.
                        </div>
                        <div class="phrase-chinese">我的钱包被偷了。</div>
                    </li>
                    <li class="phrase-item">
                        <div class="phrase-english">
                            <button class="audio-btn" onclick="playAudio('where-is-the-police-station')">
                                <i>▶</i>
                            </button>
                            Where is the police station?
                        </div>
                        <div class="phrase-chinese">警察局在哪里？</div>
                    </li>
                </ul>
            </div>
        </div>
        
        <footer>
            <p>© 2025 日本旅行实用英语指南 | 由专业旅行博主提供 | 最后更新：2025年4月</p>
        </footer>
    </div>
    
    <script>
        // 模拟音频功能
        function playAudio(phraseId) {
            // 为了演示，我们仅显示一条消息，实际应用中会加载并播放音频文件
            const btn = event.currentTarget;
            const originalIcon = btn.innerHTML;
            
            // 添加播放效果
            btn.classList.add('playing');
            btn.innerHTML = '▶️';
            
            // 提示语音播放中
            console.log(`Playing audio for: ${phraseId}`);
            
            // 模拟播放完成
            setTimeout(() => {
                btn.classList.remove('playing');
                btn.innerHTML = originalIcon;
            }, 2000);
            
            // 实际实现时，这里会加载并播放实际的音频文件
            // const audio = new Audio(`audio/${phraseId}.mp3`);
            // audio.play();
        }
        
        // 搜索功能
        function searchPhrases() {
            const searchTerm = document.getElementById('search-input').value.toLowerCase();
            if (!searchTerm) return;
            
            // 获取所有短语项
            const phraseItems = document.querySelectorAll('.phrase-item');
            let foundCount = 0;
            
            // 移除之前的高亮
            document.querySelectorAll('.highlight-search').forEach(el => {
                el.classList.remove('highlight-search');
            });
            
            // 搜索并高亮匹配项
            phraseItems.forEach(item => {
                const englishText = item.querySelector('.phrase-english').textContent.toLowerCase();
                const chineseText = item.querySelector('.phrase-chinese').textContent.toLowerCase();
                
                if (englishText.includes(searchTerm) || chineseText.includes(searchTerm)) {
                    item.style.backgroundColor = '#fff8e1';
                    item.classList.add('highlight-search');
                    foundCount++;
                    
                    // 滚动到第一个匹配项
                    if (foundCount === 1) {
                        item.scrollIntoView({behavior: 'smooth', block: 'center'});
                    }
                } else {
                    item.style.backgroundColor = '';
                }
            });
            
            alert(`找到 ${foundCount} 个匹配结果`);
        }
        
        // 选项卡切换
        document.querySelectorAll('.nav-tabs a').forEach(tab => {
            tab.addEventListener('click', function(e) {
                e.preventDefault();
                
                // 移除所有激活状态
                document.querySelectorAll('.nav-tabs a').forEach(t => {
                    t.classList.remove('active');
                });
                
                // 添加当前激活状态
                this.classList.add('active');
                
                // 滚动到目标部分
                const targetId = this.getAttribute('href');
                document.querySelector(targetId).scrollIntoView({behavior: 'smooth', block: 'start'});
            });
        });
        
        // 响应式导航
        window.addEventListener('resize', function() {
            const tabs = document.querySelector('.nav-tabs');
            if (window.innerWidth < 768) {
                tabs.style.flexWrap = 'wrap';
            } else {
                tabs.style.flexWrap = 'nowrap';
            }
        });
        
        // 页面加载时初始化
        window.addEventListener('load', function() {
            // 模拟预加载音频文件
            console.log('预加载音频文件...');
            
            // 设置响应式导航
            if (window.innerWidth < 768) {
                document.querySelector('.nav-tabs').style.flexWrap = 'wrap';
            }
        });
    </script>
</body>
</html>